#ifndef _LITE_LOG_H
#define _LITE_LOG_H

#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */

enum
{
	DEBUG_LOG_LEVEL_INFO = 0,
	DEBUG_LOG_LEVEL_WARN,
	DEBUG_LOG_LEVEL_ERRO
};

#define DEBUG_LOG_LEVEL_INFO_TITLE             "INFO"
#define DEBUG_LOG_LEVEL_WARN_TITLE             "WARN"
#define DEBUG_LOG_LEVEL_ERRO_TITLE             "ERRO"

#define MAX_LOG_MESSAGE_LENGTH             4096

extern int loglevel;
extern int enable_stdout;
extern int enable_stderr;

/* Format the log message in below format: date time messagelevel processid:threatid message (filename|linenumber)
 *
 */
int dbglog(const char* message, int messagelevel, int fd, const char* source_file_name, int source_line_num);
int dbglogex(const char* message, int messagelevel, int fd, const char* source_file_name, int source_line_num, ...);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* _MS_LOG_H */
